package com.jy.rhin.model.body.jiankangtj;


import com.jy.rhin.infra.cda.EDataElement;
import com.jy.rhin.infra.cda.XPath;
import com.jy.rhin.infra.cda.XValid;
import com.jy.rhin.parse.ItemSTSelector;
import com.jy.rhin.parse.ItemValueSelector;
import lombok.Data;

import java.util.List;

/**
 * 住院史
 * @author shenguangyang
 */
@Data
public class ZhuYuanS {
    //入院日期
    @XPath(path = "/effectiveTime/low/@value"
            , xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE06_00_091_00))
    String ruYuanSJ;

    // 出院日期
    @XPath(path = "/effectiveTime/high/@value"
            , xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE06_00_016_00))
    String chuYuanSJ;

    // 医疗机构名称
    @XPath(path = "/performer/assignedEntity/representedOrganization/name/text()"
            , xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE08_10_013_00))
    String yiLiaoJGMC;

    // 曾住院病案号
    @XPath(path = "/entryRelationship/..",
            listItemPath = "/entryRelationship/observation/code[@code='DE01.00.004.00'][@codeSystem='2.16.156.10011.2.2.1']/..",
            itemParser = ItemValueSelector.class,
            listItemBackLevel = 0, xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE01_00_004_00))
    List<String> cengZhuYBAHList;

    // 住院原因, eg: 病情较为严重,建议入院观察
    @XPath(path = "/entryRelationship/..",
            listItemPath = "/entryRelationship/observation/code[@code='DE05.10.053.00'][@codeSystem='2.16.156.10011.2.2.1']/..",
            itemParser = ItemSTSelector.class,
            listItemBackLevel = 0, xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE05_10_053_00))
    List<String> zhuYuanYYList;
}
